<template>
  <div>
    <a-row>
      <a-col :flex="1">
        <a-form
          :model="formModel"
          :label-col-props="{ span: 6 }"
          :wrapper-col-props="{ span: 18 }"
          label-align="left"
          ref="searchFormRef"
        >
          <a-row :gutter="16">
            <a-col :span="8">
              <a-form-item field="createdTime" label="生产日期">
                <a-month-picker
                  :defaultValue="dayjs().format('YYYY-MM')"
                  style="width: 100%"
                  v-model="form.search_pro_date"
                  placeholder="请选择生产时间"
                />
              </a-form-item>
            </a-col>
          </a-row>
        </a-form>
      </a-col>
      <a-divider style="height: 84px" direction="vertical" />
      <a-col :flex="'86px'" style="text-align: right">
        <a-space direction="vertical" :size="18">
          <a-button type="primary" @click="getBlendList">
            <template #icon>
              <icon-search />
            </template>
            {{ $t('searchTable.form.search') }}
          </a-button>
          <!-- <a-button @click="reset">
            <template #icon>
              <icon-refresh />
            </template>
            {{ $t('searchTable.form.reset') }}
          </a-button> -->
        </a-space>
      </a-col>
    </a-row>
    <a-divider style="margin-top: 0" />
  </div>
</template>

<script lang="ts" setup>
import { reactive, ref } from 'vue';
import dayjs from 'dayjs';

const props = defineProps({
  wineTypeList: { type: Array, default: () => [] },
  getWineProInf:{ type: Function, default: () => {} },
});
const searchFormRef = ref();

const form = reactive({
  search_pro_date: dayjs().format('YYYY-MM'),
});
const getBlendList = () => {
  props.getWineProInf();
}
const reset = () => {
  form.search_pro_date = dayjs().format('YYYY-MM');
  props.getWineProInf(getWineProInf);
};
defineExpose({
  form,
});
</script>

<style scoped lang="less">
</style>